package ben.samplegame.collision;

import ben.samplegame.sprite.SampleBullet;
import ben.samplegame.sprite.SampleEnemy;
import ben.samplegame.sprite.SamplePlayer;

/**
 * 
 * @author Team2
 * Collision behavior for enemies.
 */
public class EnemyCollisionBehavior extends GravishotCollision {
    private SampleEnemy myCollidable;

    /**
     * Constructor.
     * @param collidable Enemy that collides into stuff.
     */
    public EnemyCollisionBehavior (SampleEnemy collidable) {
        super(collidable);
        myCollidable = collidable;

    }

    /**
     * Visiting a player. Should destroy them.
     * @param player Player being collided with.
     */
    public void visit(SamplePlayer player) {
        myCollidable.setActive(false);
        player.setActive(false);
    }
    /**
     * Collision behavior for enemy when it collides with a bullet.
     * @param bullet Bullet enemy is colliding with.
     */
    public void visit(SampleBullet bullet) {
        bullet.setActive(false);
        myCollidable.setActive(false);
    }

    @Override
    public void visit (SampleEnemy enemy) {
        // TODO Auto-generated method stub
        
    }

}
